package com.ccc.boot.system.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.ccc.boot.system.entity.RelRoleResource;

import java.util.List;

/**
 * 角色资源中间表 业务处理接口
 *
 * @author superC
 * @version 0.1.0
 * @date 2022/4/2
 */

public interface RelRoleResourceService {

    boolean insert(RelRoleResource entity);

    boolean insert(Long roleId, Integer resourceType, Long resourceId);

    boolean insertMenus(Long roleId, List<Long> menuIds);

    boolean insertApis(Long roleId, List<Long> apiIds);

    boolean delete(Integer resourceType, Long resourceId);

    void delete(Long roleId, Integer resourceType, Long resourceId);

    boolean deleteApis(List<Long> apiIds);

    boolean deleteApis(Long roleId, List<Long> apiIds);

    boolean deleteResource(Long roleId);

    boolean check(Long roleId);

    boolean check(Integer resourceType, Long resourceId);

    boolean check(Long roleId, Integer resourceType, Long resourceId);

    boolean check(LambdaQueryWrapper<RelRoleResource> wrapper);

    List<Long> getMenuIds(Long roleId);

}